<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><!DOCTYPE HTML>
<%-- <%@include file="edit.jsp"%> --%>

<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="robots" content="noindex, nofollow">
	<title>The <code>change</code> event</title>
	<script src="https://cdn.ckeditor.com/4.7.3/standard-all/ckeditor.js"></script>
</head>

<body>

	<textarea cols="80" id="editor2" name="editor2" rows="10">
	</textarea>
	<div id="content2" style="display: none">
		<p>当前编辑器有<strong><span id="changes"></span></strong>字节。</p>
		<h3>获取编辑器内容：</h3>
		<div id="editorcontent2">
		</div>
	</div>

	<script>
		(function () {
			var changesCount = 0;
			var editor2 = CKEDITOR.replace( 'editor2', {
				height: 300,
				//此处配置详情查看文档https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_file_manager_configuration
				//filebrowserBrowseUrl: '/browser/browse.php',
				//filebrowserImageBrowseUrl: '/file/upload',
				filebrowserUploadUrl: '/file/uploadCkeditorImp',
				//filebrowserImageUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images'
			});
			editor2.on( 'change', function ( ev ) {
				changesCount++;
				document.getElementById( 'content2' ).style.display = '';
				document.getElementById( 'changes' ).innerHTML = changesCount.toString();
				document.getElementById( 'editorcontent2' ).innerHTML = editor2.getData();
			} );
		})();
	</script>
</body>

</html>